import { createRouter, createWebHistory, RouteRecordRaw } from "vue-router";

//路由配置项
const routes: Array<RouteRecordRaw> = [
    {
        path: '/',//引导页
        component: () => import('../views/Guide/index.vue')
    },
    {
        path: '/login',//登录页
        component: () => import('../views/Login/index.vue')
    },
    {
        path: '/register',//注册
        component: () => import('@/views/Login/Register/index.vue')
    },
    {
        path: '/setpass',//设置密码
        component: () => import('@/views/Login/Setpass/index.vue')
    },
    {
        path: '/authcode',//输入验证码
        component: () => import('@/views/Login/Authcode/index.vue')
    },
    {
        path: '/emailpass',//邮箱登录
        component: () => import('@/views/Login/Emailpass/index.vue')
    },
    {
        path: '/phonecode',//手机登录
        component: () => import('@/views/Login/Phonecode/index.vue')
    },
    {
        path: '/register',
        component: () => import('@/views/Login/Register/index.vue')
    },
    {
        path: '/setpass',
        component: () => import('@/views/Login/Setpass/index.vue')
    },
    {
        path: '/authcode',
        component: () => import('@/views/Login/Authcode/index.vue')
    },
    {
        path: '/emailpass',
        component: () => import('@/views/Login/Emailpass/index.vue')
    },
    {
        path: '/savepass',
        component: () => import('../views/Login/Setpass/index.vue')
    },
    {
        path: '/Hello',
        component: () => import('../views/Hello/index.vue'),
    },
    {
        path: '/room',
        component: () => import('../views/Hello/room/index.vue')
    },
    {
        path: '/entrance',
        component: () => import('../views/Hello/entrance/index.vue')
    },
    {

        path: '/My',
        component: () => import('../views/My/index.vue')
    },
    {
        path: '/equipment',//设备
        component: () => import('../views/Hello/equipment/index.vue')
    },
    {
        path: '/Myroom',
        component: () => import('../views/Hello/Myroom/index.vue')
    },
    {
        path: '/Living',//客厅
        component: () => import('../views/Hello/Living/index.vue')
    },
    {
        path: '/addroom',
        component: () => import('../views/Hello/addroom/index.vue')
    },
    {
        path: '/lamp',//灯设置
        component: () => import('../views/Hello/lamp/index.vue')
    },
    {
        path: '/Temperature',//客厅温度
        component: () => import('../views/Hello/temperature/index.vue')
    },
    {
        path: '/Livingroom',//房间
        component: () => import('../views/Hello/Livingroom/index.vue')
    },
    {
        path: '/icebox',//冰箱
        component: () => import('../views/Hello/icebox/index.vue')
    },
    {
        path: '/Power',//冰箱耗电
        component: () => import('../views/Hello/Power/index.vue')
    },
    {
        path: '/Conditioner',//空调
        component: () => import('../views/Hello/conditioner/index.vue')
    },

    {
        path: '/Lifedata',//生活数据
        component: () => import('../views/Hello/Lifedata/index.vue')
    },
    {
        path: '/usage',
        component: () => import('../views/Hello/usage/index.vue')
    },
    {
        path: '/authcode',
        component: () => import('@/views/Login/Authcode/index.vue')
    },
    {
        path: '/emailpass',
        component: () => import('@/views/Login/Emailpass/index.vue')
    },
  
    {
        path: '/room',
        component: () => import('../views/Hello/room/index.vue')
    },
    {
        path: '/entrance',
        component: () => import('../views/Hello/entrance/index.vue')
    },
    {
        path: '/My',
        component: () => import('../views/My/index.vue')
    }
];

const router = createRouter({
    history: createWebHistory(),
    routes,
});
//导航守卫
// router.beforeEach((to, from, next) => {});
export default router;
